from django.db import models


class Item(models.Model):
    name = models.CharField(max_length=100)
    description = models.TextField()


class Users(models.Model):
    id = models.AutoField(primary_key=True)
    name = models.CharField(max_length=20)
    age = models.IntegerField(default=18)
    college = models.CharField(max_length=30)
    major = models.CharField(max_length=30)
    grade = models.IntegerField()

    class Meta:  # 必须要在类里的在定义类才能改表名
        db_table = 'users'  # 这里我们设置我们的表名为users
